|
|
I'm putting this in the povray.newusers area because I suspect it may be a
question that only someone with limited knowledge of POV-Ray might find
themselves needing to ask. I, however, have been using POV-Ray off and on
for quite a few years. My first POV-Ray stuff was done back when it was a
DOS-based program.
That having been said, I'm having a very perplexing problem. I'm trying to
make a planet with POV-Ray 3.6. I create this humungous sphere with a
camera focused on it's edge at an extreme closeup. At this point you can't
really tell that you're looking at a shpere; just like looking at the
horizon on Earth, everything is just flat and fades off in the distance.
Then I start moving the camera back to get a wider perspective. It was my
intent to pick a position that would give me a view of the whole planet. I
put my camera at -6E4 * z, then -6E5 * z, etc. However, when I went to
-6E7, the planet completely disappeared!
To debug the problem, I set the distance at -6E6 (the last time I saw the
planet where it was supposed to be) and multiplied it by 2, 3, etc. to see
exactly where the planet disappears. I found that the planet wasn't just
vanishing, it was dropping (downwards) out of the view. But, my lood_at
value never changed!?! My planet's position was never changed. I don't
get it.
Below is the code that will demonstrate the effect. If you increase the
Z_Multiplier value by increments of 0.2, you can watch the planet, step by
step, drop below the camera's view. I don't want it to do that.
Can anybody tell me what is going on and, more importantly, what I can do to
fix it?
Thanks a bunch!
===== Code begins ======
// Vers: 3.5
// Desc: Basic Scene Example
// Date: mm/dd/yy
// Auth: ?
//
#version 3.6;
#include "colors.inc"
global_settings
{
assumed_gamma 1.0
}
// ----------------------------------------
#declare View_WorldView = 1;
#declare View_CloseUp = 2;
#declare SwitchView = View_WorldView;
//#declare SwitchView = View_CloseUp;
#declare Z_Multiplier = 2.0;
#declare CamPos_WorldView = < 0.0, 0.0, -Z_Multiplier * 6E6 >;
#declare LookAt_WorldView = < 0.0, 0.0, 0.0 >;
#declare CamPos_CloseUp = < 0.0, 5.5, -12 >;
#declare LookAt_CloseUp = < 0.0, 2.0, 0.0 >;
// ----------------------------------------
camera
{
#switch ( SwitchView )
#case ( View_CloseUp )
location CamPos_CloseUp
look_at LookAt_CloseUp
#break
#case ( View_WorldView )
location CamPos_WorldView
look_at LookAt_WorldView
#break
#end // of switch
direction 1.5 * z
right x * image_width / image_height
}
// ----------------------------------------
background
{
rgb < 0.6, 0.7, 1.0 >
}
// ----------------------------------------
light_source
{
< 0, 0, 0 > // light's position (translated below)
color rgb < 1, 1, 1 > // light's color
translate < -30, 30000, -30000000 >
}
// ----------------------------------------
#declare PlanetaryRadius = ( 4000.0 * 5280.0 ); //3820.0;
#declare Water = false;
// The World
sphere
{
0.0, PlanetaryRadius
#if ( Water )
texture
{
pigment
{
color < 0, 0, 0 >
}
normal
{
bumps 0.03
scale 0.2 //0.05
}
finish
{
reflection 0.7
}
}
#else
texture
{
pigment
{
color rgb < 0.7, 0.5, 0.3 >
}
}
#end
translate -PlanetaryRadius * y
}
// ----------------------------------------
==== End of code ====
Post a reply to this message
|
|